package com.bit.ThreadTest;

import java.util.Timer;
import java.util.TimerTask;

public class Test12 {
    public static void main1(String[] args) {
        Timer timer = new Timer();
        System.out.println("代码开始执行");
        timer.schedule(new TimerTask() {
            @Override
            public void run() {
                System.out.println("触发定时器");
            }
        },3000);
    }

}
